package com.core.service.impl;

import com.core.constant.RedisKey;
import com.core.service.LogoutService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

/**
 * @author : HUANG
 * @create : 2025/6/2 15:55
 * @function :
 */
@Service
public class LogoutServiceImpl implements LogoutService {


    @Autowired
    private RedisTemplate redisTemplate;

    @Override
    public void logout(String username) {
        redisTemplate.delete(RedisKey.LOGIN_KEY + username);
    }
}
